package com.huhu.service.impl;

import com.huhu.entity.CommentInfo;
import com.huhu.entity.vo.CommentInfoVO;
import com.huhu.mapper.CommentMapper;
import com.huhu.service.CommentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {
    @Resource
    private CommentMapper commentMapper;

    @Override
    public List<CommentInfoVO> getList(Long aid) {
        return commentMapper.getList(aid);
    }

    @Override
    public boolean addComment(CommentInfo commentInfo) {
        return commentMapper.addComment(commentInfo);
    }

    @Override
    public boolean deleteCommentById(Long cid) {
        return commentMapper.deleteCommentById(cid);
    }
}
